/********************************************/
  // Creation History
  // --------------------------------------------------------------
  //	Company:			HTHK
  //	NAME:				StaffProject.java
  //    Title   :			Reflect the Staff Project Data Table
  //	FUNCTION:
  //	BY:					Beyes Xia
  //	DATE:				16/12/2003
  // --------------------------------------------------------------
/*********************************************/
// Copyright (c) 2002 HTHK

package tss.staffproject;

import com.ffpc.sql.*;

import tss.staffproject.StaffProjectBean;

public class StaffProject
   extends DataObject
   implements StaffProjectBean
{
   private String project_name = null;
   private String staff_no = null;
   private Column ColProjectName = null;
   private Column ColStaffNo = null;
   /**
    * Constructor
    */
   public StaffProject()
   {
       ColProjectName = new Column(0,"project_name",Column.Types.string,null,20,false);
       ColStaffNo = new Column(1,"staff_no",Column.Types.string,null,5,false);
   }

   // functions belongs to StaffProjectBean interface

   @Override
public void setProject_name(String project_name)
   {       this.project_name = this.setAttribute(ColProjectName,project_name);
   }

   @Override
public String getProject_name()
   {       return this.project_name==null?"":this.project_name;
   }

   @Override
public void setStaff_no(String staff_no)
   {       this.staff_no = this.setAttribute(ColStaffNo,staff_no);
   }

   @Override
public String getStaff_no()
   {       return this.staff_no==null?"":this.staff_no;
   }

   // belongs to row interface

   @Override
public Column[] createColumns()
   {
       Column[] cols = new Column[2];
       cols[0] = ColProjectName.clone(null);
       cols[1] = ColStaffNo.clone(null);
       return cols;
   }

   // super's abstract methods

   @Override
public String getTableName()
   {
       return "tss.tss_c_staff_project";
   }

   @Override
protected String[] getKeyColumnNames()
   {
       String[] list = {
                         "project_name"
                         ,"staff_no"
                       };
       return list;
   }

   @Override
protected String[] getUpdatableColumnNames()
   {
       String[] list = {
                       };
       return list;
   }

   @Override
protected void retrieveColumnValues()
   {
       this.project_name = this.retrieveColumnValue("project_name");
       this.staff_no = this.retrieveColumnValue("staff_no");
   }
}

